module top_module (input x, input y, output z);
    
    wire in1, in2, in3, in4;
    wire in5, in6;
    assign in1 = (x^y)&x;
	assign in2 = (!x&!y)|(x&y);
    assign in3 = (x^y)&x;
	assign in4 = (!x&!y)|(x&y);
    
    assign in5 = in1 | in2;
    assign in6 = in3 & in4;
    
    assign z = in5 ^ in6;
endmodule